//
//  FriendsViewController.m
//  HallView
//
//  Created by Lv Changye on 11-7-19.
//  Copyright 2011年 139me. All rights reserved.
//

#import "FriendsViewController.h"
//#import "Const.h"

@implementation FriendsViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)dealloc
{
    [zongji release];
    [nicheng release];
    [chouma release];
    [jibie release];
    [zhuangtai release];
    [touxiang release];
    [textfield release];
   
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    UITableView *table=[[UITableView alloc]initWithFrame:CGRectMake(10, 8, 200, 183) style:UITableViewStylePlain];
    table.backgroundColor=[UIColor clearColor];
    table.delegate=self;
    table.dataSource=self;
    table.separatorColor=[UIColor clearColor];
    table.separatorStyle=UITableViewCellSeparatorStyleSingleLineEtched;
    table.rowHeight=58.0;
 
    UIView *tempview=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 200, 1)];
    table.tableHeaderView=tempview;
    table.tableFooterView=tempview;
    [tempview release];
    [self.view addSubview:table];
    [table release];
    
    if (textfield==nil) {
        textfield=[[UITextField alloc]initWithFrame:CGRectMake(45, 230, 193, 27)];
        textfield.backgroundColor=[UIColor colorWithWhite:0.2 alpha:0.9];
        textfield.placeholder=@"昵称,电子邮件或个人ID";
        textfield.font=[UIFont systemFontOfSize:15];
        textfield.textColor=[UIColor whiteColor];
    }
    [self.view addSubview:textfield];
    
    [super viewDidLoad];
    
    
    // Do any additional setup after loading the view from its nib.
}

- (void)viewDidUnload
{
    
    zongji = nil;
    nicheng=nil;
    chouma=nil;
    jibie=nil;
    zhuangtai=nil;
    touxiang=nil;
    textfield=nil;
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
	return YES;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 5;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 2.0f;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    UIView *tempview=[[[UIView alloc]initWithFrame:CGRectMake(0, 0, 200, 2)]autorelease];
    return tempview;

    }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *SimpleTableIdentifier = @"SimpleTable";
	UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleTableIdentifier];
	if (cell == nil) {
		cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:SimpleTableIdentifier]autorelease];
    
    cell.backgroundColor=[UIColor clearColor];
    cell.textLabel.backgroundColor=[UIColor clearColor];
    UIImageView *imageview=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"好友框未选中.png"]];
    [imageview.layer setCornerRadius:5.0f];
    cell.backgroundView=imageview;
    [imageview release];
    [cell.layer setCornerRadius:5.0f];
    cell.clipsToBounds=YES;
    UIImageView *imageview1=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"好友框选中.png"]];
    [imageview1.layer setCornerRadius:5.0f];
    cell.selectedBackgroundView=imageview1;
    [imageview1 release];
    
    UIImageView *tou=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"好友左头像.png"]];
    tou.frame=CGRectMake(5, 5, 42, 49);
    [cell addSubview:tou];
    [tou release];
    
    UILabel *cellnicheng=[[UILabel alloc]initWithFrame:CGRectMake(50, 1, 40, 20)];
    cellnicheng.text=@"昵称:";
    cellnicheng.font=[UIFont systemFontOfSize:12];
    cellnicheng.textColor=[UIColor whiteColor];
    cellnicheng.backgroundColor=[UIColor clearColor];
    [cell addSubview:cellnicheng];
    [cellnicheng release];
    
    
    UILabel *cellchouma=[[UILabel alloc]initWithFrame:CGRectMake(50, 19, 40, 20)];
    cellchouma.text=@"筹码:";
    cellchouma.font=[UIFont systemFontOfSize:12];
    cellchouma.textColor=[UIColor whiteColor];
    cellchouma.backgroundColor=[UIColor clearColor];
    [cell addSubview:cellchouma];
    [cellchouma release];
    UILabel *cellzhuangtai=[[UILabel alloc]initWithFrame:CGRectMake(50, 36, 40, 20)];
    cellzhuangtai.text=@"状态:";
    cellzhuangtai.font=[UIFont systemFontOfSize:12];
    cellzhuangtai.textColor=[UIColor whiteColor];
    cellzhuangtai.backgroundColor=[UIColor clearColor];
    [cell addSubview:cellzhuangtai];
    [cellzhuangtai release];
    UILabel *celljibie=[[UILabel alloc]initWithFrame:CGRectMake(120,36, 40, 20)];
    celljibie.text=@"级别:";
    celljibie.font=[UIFont systemFontOfSize:12];
    celljibie.textColor=[UIColor whiteColor];
    celljibie.backgroundColor=[UIColor clearColor];
    [cell addSubview:celljibie];
    [celljibie release];
    
    
    }
    
    return  cell;
    
}
- (IBAction)chakanpaizhuo:(id)sender {
    
}

- (IBAction)fasongchouma:(id)sender {
}

- (IBAction)shanchuhaoyou:(id)sender {
}

- (IBAction)chazhao:(id)sender {
}

- (IBAction)gongxiang:(id)sender {
}
@end
